home *** CD-ROM | disk | FTP | other *** search
/ Web Clips Gallery 98 / web clips 98.iso / MIX / 13_000 / UNIT1.PAS < prev   
Encoding:
Pascal/Delphi Source File  |  1998-03-23  |  1.0 KB  |  51 lines

  1. unit Unit1;
  2.  
  3. interface
  4.  
  5. uses
  6.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  7.   StdCtrls, FileCtrl;
  8.  
  9. type
  10.   TForm1 = class(TForm)
  11.     flb: TFileListBox;
  12.     Button1: TButton;
  13.     OpenDialog1: TOpenDialog;
  14.     lb: TListBox;
  15.     hb: TListBox;
  16.     procedure Button1Click(Sender: TObject);
  17.   private
  18.     { Private declarations }
  19.   public
  20.     { Public declarations }
  21.   end;
  22.  
  23. var
  24.   Form1: TForm1;
  25.   i:Integer;
  26.   s:String;
  27.  
  28. implementation
  29.  
  30. {$R *.DFM}
  31.  
  32. procedure TForm1.Button1Click(Sender: TObject);
  33. begin
  34. if opendialog1.Execute then
  35. flb.directory:=extractfiledir(opendialog1.filename);
  36. lb.items:=flb.items;
  37. For i:=0 to lb.items.count-1 do
  38. begin
  39. s:='<img src='+lb.items[i]+'><br>';
  40. hb.items[1]:='<img src=../coner.gif align=left>'+s;
  41. s:=flb.directory;
  42. s:=copy(s,11,length(s));
  43. hb.items[2]:='The directory on the CD is '+s;
  44. hb.items.savetofile(inttostr(i)+'.htm');
  45. lb.items[i]:='<option>'+lb.items[i];
  46. end;
  47. //lb.items.savetofile('c:\win95\desktop\bg.txt');
  48. end;
  49.  
  50. end.
  51.